﻿using FluentValidation.Attributes;
using Nop.Admin.Models.Common;
using Nop.Admin.Validators.XJ;
using Nop.Web.Framework.Mvc;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Nop.Admin.Models.XJ
{
	public class EquipmentCategoryListModel
	{
		public string SearchCategoryName { get; set; }
		public int SearchPId { get; set; }
	}
	[Validator(typeof(EquipmentCategoryValidator))]
	public class EquipmentCategoryModel : BaseNopEntityModel
	{
		public EquipmentCategoryModel()
		{
			AvailableCategories = new List<SelectMenuModel>();
		}
		/// <summary>
		/// 主分类：设施设备、配件
		/// <see cref="CategoryMainEnum"/>
		/// </summary>
		public int CategoryMainId { get; set; }
		/// <summary>
		/// 父ID
		/// </summary>
		[UIHint("SelectMenu")]
		public int PId { get; set; }
		/// <summary>
		/// 分类名称
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// 排序
		/// </summary>
		public int DisplayOrder { get; set; }
		/// <summary>
		/// 是耗材；否则，设施设备
		/// </summary>
		public bool IsConsumables { get; set; }
		/// <summary>
		/// 发布
		/// </summary>
		public bool Published { get; set; }

		public string Breadcrumb { get; set; }
		public IList<SelectMenuModel> AvailableCategories { get; set; }
	}
}